package com.hualan.dao.impl;

import com.hualan.dao.CourierStationModifyDao;
import com.hualan.utils.DruidUtil;

public class CourierStationModifyDaoImpl implements CourierStationModifyDao {
    @Override
    public int modifyCourierStation(String courierStationAddress, String courierStationCity, String courierStationCommunityId, String courierStationDistrict, String courierStationImage, String courierStationName, String courierStationProvince, String courierStationId) {

        String sql = "update panghu_courier_station set courier_station_address = ?, courier_station_city = ?, courier_station_community_id = ?, courier_station_district = ?, courier_station_name = ?, courier_station_province = ? where courier_station_id = ?";

        System.out.println("dao层：" + courierStationCity);
        int row = DruidUtil.update(sql, courierStationAddress, courierStationCity, courierStationCommunityId, courierStationDistrict,  courierStationName, courierStationProvince, courierStationId);

        return row;
    }
    @Override
    public int putOrDownCourierStation(String courierStationId, String courierStationStatus){
        String sql = "update panghu_courier_station set courier_station_status = ? where courier_station_id = ?";

        System.out.println("dao层修改上下架：" + courierStationStatus);
        int row = DruidUtil.update(sql, courierStationStatus, courierStationId);

        return row;
    }

}
